javascript coding interview questions part 6